using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Cuestionarios.BaseDatos.Models.Mapping;

namespace Cuestionarios.BaseDatos.Models
{
    public partial class CuestionariosContext : DbContext
    {
        static CuestionariosContext()
        {
            Database.SetInitializer<CuestionariosContext>(null);
        }

        public CuestionariosContext()
            : base("Name=CuestionariosContext")
        {
        }

        public DbSet<Catalogo> Catalogoes { get; set; }
        public DbSet<Cuestionario> Cuestionarios { get; set; }
        public DbSet<Opcion> Opcions { get; set; }
        public DbSet<Pregunta> Preguntas { get; set; }
        public DbSet<PreguntaCuestionario> PreguntaCuestionarios { get; set; }
        public DbSet<Recurso> Recursoes { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CatalogoMap());
            modelBuilder.Configurations.Add(new CuestionarioMap());
            modelBuilder.Configurations.Add(new OpcionMap());
            modelBuilder.Configurations.Add(new PreguntaMap());
            modelBuilder.Configurations.Add(new PreguntaCuestionarioMap());
            modelBuilder.Configurations.Add(new RecursoMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
        }
    }
}
